<?php
namespace Plugin\Organization\Schema;

use Plugin\Organization\Model\RdOrganizeAreaStand;
use Hyperf\Swagger\Annotation\Property;
use Hyperf\Swagger\Annotation\Schema;

/**
 * 站点表
 */
#[Schema(title: 'RdOrganizeAreaStandSchema')]
class RdOrganizeAreaStandSchema implements \JsonSerializable
{
    #[Property(property: 'id', title: '主键', type: 'bigint')]
    public string $id;

    #[Property(property: 'area_id', title: '所属工区ID', type: 'bigint')]
    public string $area_id;

    #[Property(property: 'proj_line_id', title: '所属项目ID', type: 'bigint')]
    public string $proj_line_id;

    #[Property(property: 'zone_id', title: '所属大区ID', type: 'bigint')]
    public string $zone_id;

    #[Property(property: 'name', title: '站点名称', type: 'varchar')]
    public string $name;

    #[Property(property: 'abbr', title: '缩写', type: 'varchar')]
    public string $abbr;

    #[Property(property: 'addr', title: '地址', type: 'varchar')]
    public string $addr;

    #[Property(property: 'longitude', title: '经度', type: 'decimal')]
    public string $longitude;

    #[Property(property: 'latitude', title: '纬度', type: 'decimal')]
    public string $latitude;

    #[Property(property: 'status', title: '状态', type: 'tinyint')]
    public string $status;

    #[Property(property: 'sort', title: '排序', type: 'int')]
    public string $sort;

    #[Property(property: 'created_by', title: '创建者', type: 'bigint')]
    public string $created_by;

    #[Property(property: 'updated_by', title: '更新者', type: 'bigint')]
    public string $updated_by;

    #[Property(property: 'created_at', title: 'created_at', type: 'timestamp')]
    public string $created_at;

    #[Property(property: 'updated_at', title: 'updated_at', type: 'timestamp')]
    public string $updated_at;

    #[Property(property: 'deleted_at', title: 'deleted_at', type: 'timestamp')]
    public string $deleted_at;

    #[Property(property: 'remark', title: '备注', type: 'varchar')]
    public string $remark;




    public function __construct(RdOrganizeAreaStand $model)
    {
       $this->id = $model->id;
       $this->area_id = $model->area_id;
       $this->proj_line_id = $model->proj_line_id;
       $this->zone_id = $model->zone_id;
       $this->name = $model->name;
       $this->abbr = $model->abbr;
       $this->addr = $model->addr;
       $this->longitude = $model->longitude;
       $this->latitude = $model->latitude;
       $this->status = $model->status;
       $this->sort = $model->sort;
       $this->created_by = $model->created_by;
       $this->updated_by = $model->updated_by;
       $this->created_at = $model->created_at;
       $this->updated_at = $model->updated_at;
       $this->deleted_at = $model->deleted_at;
       $this->remark = $model->remark;

    }

    public function jsonSerialize(): array
    {
        return ['id' => $this->id ,'area_id' => $this->area_id ,'proj_line_id' => $this->proj_line_id ,'zone_id' => $this->zone_id ,'name' => $this->name ,'abbr' => $this->abbr ,'addr' => $this->addr ,'longitude' => $this->longitude ,'latitude' => $this->latitude ,'status' => $this->status ,'sort' => $this->sort ,'created_by' => $this->created_by ,'updated_by' => $this->updated_by ,'created_at' => $this->created_at ,'updated_at' => $this->updated_at ,'deleted_at' => $this->deleted_at ,'remark' => $this->remark];
    }
}